﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WCFService
{
    // NOTE: If you change the interface name "IChatService" here, you must also update the reference to "IChatService" in App.config.
    [ServiceContract(SessionMode = SessionMode.Required, CallbackContract = typeof(IChatCallback))]
    public interface IChatService
    {
        [OperationContract(IsInitiating = true)]
        bool Connect(WCFService.Client client);

        [OperationContract(IsOneWay = true)]
        void Say(WCFService.Message msg);


        [OperationContract(IsOneWay = true)]
        void Whisper(WCFService.Message msg, WCFService.Client receiver);

        [OperationContract(IsOneWay = true, IsTerminating = true)]
        void Disconnect(WCFService.Client client);
    }
}
